package com.wzt.lianfirecontrol.bean.recode.home;

import com.wzt.lianfirecontrol.bean.BaseModel;
import com.wzt.lianfirecontrol.bean.EarlyAlarmCountBean;
import com.wzt.lianfirecontrol.bean.FireAlarmCountBean;
import com.wzt.lianfirecontrol.bean.RiskAlarmCountBean;
import com.wzt.lianfirecontrol.bean.StatisticBean;
import com.wzt.lianfirecontrol.bean.SuperviseAlarmCountBean;


import java.util.ArrayList;
import java.util.List;

/**
 * 表格
 */
public class ChartsModel2 extends BaseModel {
    private String chartTitle;
    private List<String> xAxis;
    private List<String> yAxis;
    private String unit;
    private String isPercentage;

    ;
    private SuperviseAlarmCountBean superviseAlarmCount; // 监管
    private FireAlarmCountBean fireAlarmCount; // 火警
    private RiskAlarmCountBean riskAlarmCount;
    private EarlyAlarmCountBean earlyAlarmCount;
    public SuperviseAlarmCountBean getSuperviseAlarmCount() {
        return superviseAlarmCount;
    }

    public void setSuperviseAlarmCount(SuperviseAlarmCountBean superviseAlarmCount) {
        this.superviseAlarmCount = superviseAlarmCount;
    }

    public FireAlarmCountBean getFireAlarmCount() {
        return fireAlarmCount;
    }

    public void setFireAlarmCount(FireAlarmCountBean fireAlarmCount) {
        this.fireAlarmCount = fireAlarmCount;
    }

    public RiskAlarmCountBean getRiskAlarmCount() {
        return riskAlarmCount;
    }

    public void setRiskAlarmCount(RiskAlarmCountBean riskAlarmCount) {
        this.riskAlarmCount = riskAlarmCount;
    }

    public EarlyAlarmCountBean getEarlyAlarmCount() {
        return earlyAlarmCount;
    }

    public void setEarlyAlarmCount(EarlyAlarmCountBean earlyAlarmCount) {
        this.earlyAlarmCount = earlyAlarmCount;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getIsPercentage() {
        return isPercentage;
    }

    public void setIsPercentage(String isPercentage) {
        this.isPercentage = isPercentage;
    }

    private List<HomeTendModel> homeTendModels;

    public String getChartTitle() {
        return chartTitle;
    }

    public void setChartTitle(String chartTitle) {
        this.chartTitle = chartTitle;
    }

    public List<String> getxAxis() {
        if (null != homeTendModels && homeTendModels.size() > 0){
            List<String> list = new ArrayList<>();
            for (int i = 0; i < homeTendModels.size(); i++){
                list.add(""+i);
            }
            return list;
        }
        return xAxis;
    }

    public List<String> getyAxis() {
        if (null != homeTendModels && homeTendModels.size() > 0){
            List<String> list = new ArrayList<>();
            for (int i = 0; i < homeTendModels.size(); i++){
                list.add(homeTendModels.get(i).getWarnSum());
            }
            return list;
        }
        return yAxis;
    }

    public void setxAxis(List<String> xAxis) {
        this.xAxis = xAxis;
    }


    public void setyAxis(List<String> yAxis) {
        this.yAxis = yAxis;
    }

    public List<HomeTendModel> getHomeTendModels() {
        return homeTendModels;
    }

    public void setHomeTendModels(List<HomeTendModel> homeTendModels) {
        this.homeTendModels = homeTendModels;
    }

    public ChartsModel2() {
    }
}
